distance formula in 3 dimensions proof